﻿using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using System;

namespace DX.DbStorage.EF
{
    public static class DbStorageExtensions
    {
        public static  void AddDbEFPool(this IServiceCollection services,Action<EFDbStorageOptions> configure, Action<DbContextOptionsBuilder> optionsAction)
        {
            services.AddDbContextPool<DbStorageContext>(optionsAction);
        }
        public static void AddDbEF(this IServiceCollection services, Action<EFDbStorageOptions> configure, Action<DbContextOptionsBuilder> optionsAction)
        {
            services.AddDbContext<DbStorageContext>(optionsAction);
        }
    }
}
